package Java学习;

import javax.swing.*;
import java.awt.*;

class xiaokeli extends JFrame{
    public xiaokeli(){
        panple();
        frame();
        this.setVisible(true);
    }
    public void frame(){
        this.setTitle("练习");
        this.setAlwaysOnTop(true);
        this.setDefaultCloseOperation(3);
        this.setLocationRelativeTo(null);
        this.pack();
    }
    public void panple(){
       JPanel pane = new JPanel();
        JLabel label = new JLabel("nihaowoshixiaokeli");
        pane.add(label);
        this.add(pane, BorderLayout.NORTH);
    }
}
public class Hello {
    public static void main(String[] args) {
        xiaokeli xiaokeli = new xiaokeli();
    }

}
